﻿var TimsMemberLogout = {
    LogOut: function () {
        $("#logout").click(function () {
            if (confirm("您确定要退出登录？")) {
                $("#login").show();
                $("#regist").show();
                $("#logout").hide();
                $.ajax({
                    type: "post",
                    url: '/Resource/Json/Json.aspx',
                    async: false,
                    data: { type: 'Member.MemberManage', Method: 'Logout', t: new Date().getTime() },
                    dataType: 'json',
                    success: function (data) {
                        if (data && data.Data == "1") {
                            alert("退出成功");
                            window.location.href = "/";
                        }
                    }
                });
            } else {
                return false;
            }
        });
    }
};
$(document).ready(function () {
    TimsMemberLogout.LogOut();
});